// 
// Decompiled by Procyon v0.5.36
// 

package com.cyberfend.cyfsecurity;

import java.lang.ref.*;
import com.cyberfend.cyfsecurity.b.*;
import android.content.*;

public final class ae
{
    private static final com.cyberfend.cyfsecurity.ae c;
    java.lang.ref.WeakReference<android.content.Context> a;
    java.lang.String b;
    
    public ae() {
        this.a = null;
        this.b = null;
    }
    
    public static com.cyberfend.cyfsecurity.ae a() {
        return com.cyberfend.cyfsecurity.ae.c;
    }
    
    public final boolean b() {
        return this.b != null;
    }
    
    public final void a(final java.lang.String b) {
        this.b = b;
        new java.lang.Thread(new java.lang.Runnable() {
            @java.lang.Override
            public final void run() {
                com.cyberfend.cyfsecurity.ae.this.d();
            }
        }).start();
    }
    
    private synchronized void c() {
        final android.content.Context context;
        if ((context = this.a.get()) == null) {
            com.cyberfend.cyfsecurity.b.a.b("SensorDataCache", "loadData: Context is null", new java.lang.Throwable[0]);
            return;
        }
        this.b = context.getSharedPreferences("com.akamai.botman.preferences", 0).getString("sensor_data", (java.lang.String)null);
    }
    
    private synchronized void d() {
        final android.content.Context context;
        if ((context = this.a.get()) == null) {
            com.cyberfend.cyfsecurity.b.a.b("SensorDataCache", "saveData: Context is null", new java.lang.Throwable[0]);
            return;
        }
        final android.content.SharedPreferences.Editor edit;
        (edit = context.getSharedPreferences("com.akamai.botman.preferences", 0).edit()).putString("sensor_data", this.b);
        edit.commit();
    }
    
    static {
        c = new com.cyberfend.cyfsecurity.ae();
    }
}
